/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#include "stdafx.h"
#include "粒子系统.h"

S_粒子系统::S_粒子系统(S_物体* setting, uint32 key)
	:S_物体(E_物体类型::t_粒子)
{
	m_粒子 = 0;
}

S_粒子系统::~S_粒子系统() {

}

void S_粒子系统::f_set位置(const vec3* xyz, uint32 num) {
	
}

void S_粒子系统::f_Update(S_渲染参数& c) {
	S_渲染参数 rc = c;
	rc.m_GPU参数 = m_粒子->m_Material->m_GPU参数set;
	//rc.m_矩阵 = m_变换矩阵;

	//f_setGPU参数布局(m_粒子->m_Material->m_Shader, rc);
}

void S_粒子系统::f_绘制(S_渲染参数& 参数) {
	S_渲染参数 渲染参数 = 参数;
	//渲染参数.m_矩阵 = m_变换矩阵;
	渲染参数.m_GPU参数 = m_粒子->m_Material->m_GPU参数set;

	f_draw粒子(m_粒子, 渲染参数);
}

void S_粒子系统::f_set矩阵(const Mat44f* mat) {
	//f_buf_fill板载缓存((S_板载缓存*)m_变换矩阵, mat, m_实例ID);
}

void S_粒子系统::f_set矩阵(const Mat44f* mat, uint32 num) {
	//((Mat44f*)(((S_板载缓存*)m_变换矩阵)->m_mappedPtr))[m_实例ID] = *mat;
}

void S_粒子系统::f_set矩阵mt(const Mat44f* mat) {

}

void S_粒子系统::f_set变换(const void* mat, uint32 id) {

}



